From ec9cf6d7c3626ce78e2dfe0fac77549308be68c2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 10 Jun 2014 08:47:27 -0400 Subject: [PATCH] GtkComboBox: Add private api to get the popup This will be used to make the popup appear in the inspector. --- gtk/Makefile.am | 1 + gtk/gtkcombobox.c | 10 ++++++++++ gtk/gtkcomboboxprivate.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 gtk/gtkcomboboxprivate.h diff --git a/gtk/Makefile.am b/gtk/Makefile.am index d9f372de30..e3cc5de00c 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -521,6 +521,7 @@ gtk_private_h_sources = \ gtkcolorplaneprivate.h \ gtkcolorscaleprivate.h \ gtkcolorchooserprivate.h \ + gtkcomboboxprivate.h \ gtkcontainerprivate.h \ gtkcssanimationprivate.h \ gtkcssarrayvalueprivate.h \ diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 0e8e75ccc4..baeb30de8d 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -44,6 +44,7 @@ #include "gtkwindow.h" #include "gtktypebuiltins.h" #include "gtkprivate.h" +#include "gtkcomboboxprivate.h" #include @@ -5919,3 +5920,12 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box, return match; } + +GtkWidget * +gtk_combo_box_get_popup (GtkComboBox *combo) +{ + if (combo->priv->popup_window) + return combo->priv->popup_window; + else + return combo->priv->popup_widget; +} diff --git a/gtk/gtkcomboboxprivate.h b/gtk/gtkcomboboxprivate.h new file mode 100644 index 0000000000..6af67e06c6 --- /dev/null +++ b/gtk/gtkcomboboxprivate.h @@ -0,0 +1,29 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 2014 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + */ + +#ifndef __GTK_COMBO_BOX_PRIVATE_H__ +#define __GTK_COMBO_BOX_PRIVATE_H__ + +#include "gtkcombobox.h" + +G_BEGIN_DECLS + +GtkWidget *gtk_combo_box_get_popup (GtkComboBox *combo_box); + +G_END_DECLS + +#endif /* __GTK_COMBO_BOX_PRIVATE_H__ */ -- 2.30.2